package com.sdu.shanyiapi.controller.form;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author lihaopeng
 * @version 1.0
 * @project shanyi-api
 * @description 登录表单，后端验证
 * @since 2024/4/13 12:24
 */
@Data
public class LoginOrRegisterForm {

    @NotBlank(message = "code不能为空")
    private String code;

    @NotBlank(message = "nickName不能为空")
    private String nickName;

    @NotBlank(message = "avatar不能为空")
    private String avatar;

    @NotBlank(message = "sex不能为空")
    @Pattern(regexp = "^男$|^女$", message = "sex内容不正确，只能为男或女")
    private String sex;
}
